package com.cy.pj.notice.pojo.dao;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
//@Repository
public class SysNoticeDaoImpl implements SysNoticeDao {
    @Autowired
    private SqlSession sqlSession;

    @Override
    public List<SysNotice> selectNotice(SysNotice notice) {
        String namespace = this.getClass().getInterfaces()[0].getName();
        String elementId = Thread.currentThread().getStackTrace()[1].getMethodName();
        String statement = namespace+"."+elementId;
        List<SysNotice> list = sqlSession.selectList(statement,notice);
        return list;

    }

    @Override
    public int deleteById(Long... id) {
        return 0;
    }

    @Override
    public int insertNotice(SysNotice notice) {
        return 0;
    }

    @Override
    public SysNotice findById(Long id) {
        return null;
    }

    @Override
    public int updateNotice(SysNotice notice) {
        return 0;
    }
}
